#!/bin/sh
set -o nounset
#set -x #DEBUG

cd $SCRIPT_BINDDIR
. bin/rootfs-library.sh

# Install new apt sources file for expanded repositories
if [ "${CONFIG_UBUNTU_RELEASE_TRUSTY-x}" = "y" ] ; then
    SRCFILE=sources.list-14.04.5
else if [ "${CONFIG_UBUNTU_RELEASE_XENIAL-x}" = "y" ] ; then
         SRCFILE=sources.list-16.04
     fi
fi

refresh_or_install_file_as \
    $SRCFILE \
    /etc/apt/sources.list \
    "Installing updated apt repository list..."

exit 0
